﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Chapter01
{
    public class ConsoleInputAndOuput
    {
        public string Input { get; set; }

        public string Ouput { get; set; }

        public void CodeListing()
        {
            HeyYou();
            ReadChar();
            HeyYouFormat();
            HeyYouLastName();
        }

        private void HeyYou()
        {
            string firstNeme;
            string lastName;
            Console.WriteLine("Hey You!");

            Console.Write("Enter your first name: ");
            firstNeme = Console.ReadLine();

            Console.Write("Enter your last name: ");
            lastName = Console.ReadLine();
            Console.WriteLine();
        }

        private void ReadChar()
        {
            ConsoleKeyInfo character;
            character = Console.ReadKey();
            Console.WriteLine();
            Console.WriteLine();
        }

        private void HeyYouFormat()
        {
            string firstNeme;
            string lastName;
            Console.WriteLine("Hey You!");

            Console.Write("Enter your first name: ");
            firstNeme = Console.ReadLine();


            Console.Write("Enter your last name: ");
            lastName = Console.ReadLine();

            Console.WriteLine("Your full name is {0} {1}.", firstNeme, lastName);
            Console.WriteLine();
        }

        private void HeyYouLastName()
        {
            string firstNeme;
            string lastName;
            Console.WriteLine("Hey You!");

            Console.Write("Enter your first name: ");
            firstNeme = Console.ReadLine();


            Console.Write("Enter your last name: ");
            lastName = Console.ReadLine();

            Console.WriteLine("Your full name is {1}, {0}.", firstNeme, lastName);
            Console.WriteLine();
        }
    }
}
